<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
	.img-area{
		height: 400px;
		width: 400px;
		margin: 100px auto;
	}
	img{
		width: 100%;
		height: 100%;
	}
</style>

</head>
<body>
	<div class="container">
	  <div class="img-area">
	    <img class="my-photo" alt="loading" data-src="img/img1.jpg">
	  </div>
	  <div class="img-area">
	    <img class="my-photo" alt="loading" data-src="img/img2.jpg">
	  </div>
	  <div class="img-area">
	    <img class="my-photo" alt="loading" data-src="img/img3.jpg">
	  </div>
	  <div class="img-area">
	    <img class="my-photo" alt="loading" data-src="img/img4.jpg">
	  </div>
	</div>
</body>
<script src="lazyload.js"></script>
	<script type="text/javascript">
		window.onload=checkImgs;
		window.onscroll = throttle(checkImgs);
	</script>
</html>